JavaScript

{dialog.object}copyRepeatingSectionRow Method

Syntax

{dialog.Object}.copyRepeatingSectionRow(repeatingSectionID, sourceRow, targetRow [, promptIfDirty [, flagFireEvents]]);

Arguments

repeatingSectionIDstring

The repeating section that contains the source row.

sourceRownumber

The source row in the repeating section that contains the data you want to copy.

targetRownumber

The row to copy data into. If set to -1, the data is copied to the active row.

promptIfDirtyboolean

Default = true. A true/false value. If set to true, the user will be prompted to confirm copying data to the target row if the target row contains existing data.

flagFireEventsboolean

Default = true. A true/false value. By default, when the row is copied, onChange events in the target fields are fired. To suppress these events, pass in false to the flagFireEvents argument.

Description

Copies the values from one row in a Repeating Section to another.

Discussion

//Copy row 1 to row 3 in the Repeating Section called 'CONTAINER_1'
{dialog.object}.copyRepeatingSectionRow('CONTAINER_1',1,3);

//Copy row 1 to row 3 in the Repeating Section called 'CONTAINER_1', and suppress the prompt
{dialog.object}.copyRepeatingSectionRow('CONTAINER_1',1,3,false);

//Copy row 1 to row 3 in the Repeating Section called 'CONTAINER_1', and customize the prompt
{dialog.object}._rsOverwriteRowMsg = 'Are you sure you want to overwrite the data in the row?';
{dialog.object}.copyRepeatingSectionRow('CONTAINER_1',1,3);

See Also